900
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('Date') as EXGANTTLib.Column) do
	begin
		SortType := EXGANTTLib.SortTypeEnum.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXGANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXGANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXGANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with (Columns.Add('DateTime') as EXGANTTLib.Column) do
	begin
		SortType := EXGANTTLib.SortTypeEnum.SortDateTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXGANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXGANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXGANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with (Columns.Add('Time') as EXGANTTLib.Column) do
	begin
		SortType := EXGANTTLib.SortTypeEnum.SortTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXGANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXGANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXGANTTLib.FilterListEnum.exSortItemsDesc);
		FormatColumn := 'time(value)';
	end;
	with (Columns.Add('Numeric') as EXGANTTLib.Column) do
	begin
		SortType := EXGANTTLib.SortTypeEnum.SortNumeric;
		DisplayFilterButton := True;
		FilterList := Integer(EXGANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXGANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXGANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with (Columns.Add('String') as EXGANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterList := Integer(EXGANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXGANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXGANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with Items do
	begin
		h := AddItem('1/27/2010');
		CellCaption[TObject(h),TObject(1)] := '1/27/2010 10:00:00 AM';
		CellCaption[TObject(h),TObject(2)] := CellCaption[TObject(h),TObject(1)];
		CellCaption[TObject(h),TObject(3)] := TObject(1);
		CellCaption[TObject(h),TObject(4)] := CellCaption[TObject(h),TObject(3)];
		h := AddItem('1/27/2011');
		CellCaption[TObject(h),TObject(1)] := '1/27/2011 9:00:00 AM';
		CellCaption[TObject(h),TObject(2)] := CellCaption[TObject(h),TObject(1)];
		CellCaption[TObject(h),TObject(3)] := TObject(11);
		CellCaption[TObject(h),TObject(4)] := CellCaption[TObject(h),TObject(3)];
		h := AddItem('11/2/2010');
		CellCaption[TObject(h),TObject(1)] := '11/2/2010 9:00:00 AM';
		CellCaption[TObject(h),TObject(2)] := CellCaption[TObject(h),TObject(1)];
		CellCaption[TObject(h),TObject(3)] := TObject(2);
		CellCaption[TObject(h),TObject(4)] := CellCaption[TObject(h),TObject(3)];
	end;
	Columns.Item['DateTime'].DisplayFilterDate := False;
	EndUpdate();
end
899
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('P1') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with (Columns.Add('P2') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
		FormatColumn := '1 index ``';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child A');
		InsertItem(h,Nil,'Child B');
		InsertItem(h,Nil,'Child A');
		InsertItem(h,Nil,'Child B');
		AddItem('Root');
		AddItem('Root');
	end;
	SingleSort := False;
	Layout := 'multiplesort="C0:1 C1:2";collapse=""';
	EndUpdate();
end
898
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TWinForm1.AxGantt1_OLEStartDrag(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_OLEStartDragEvent);
begin
	// Data.SetData("data to drag")
	with AxGantt1 do
	begin
		e.allowedEffects := 1;
	end
end;

with AxGantt1 do
begin
	OLEDropMode := EXGANTTLib.exOLEDropModeEnum.exOLEDropManual;
	set_Background(EXGANTTLib.BackgroundPartEnum.exDragDropAfter,$ffffff);
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
end
897
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exRowLines;
	AutoDrag := EXGANTTLib.AutoDragEnum.exAutoDragPositionAny;
	HasLines := EXGANTTLib.HierarchyLineEnum.exSolidLine;
	Indent := 16;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (Add('') as EXGANTTLib.Column) do
		begin
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
			FormatColumn := '((1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		CellState[TObject(hChild),TObject(0)] := 1;
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
896
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	GridLineColor := Color.FromArgb(190,190,190);
	DrawGridLines := EXGANTTLib.GridLinesEnum.exRowLines;
	AutoDrag := EXGANTTLib.AutoDragEnum.exAutoDragPositionAny;
	HasLines := EXGANTTLib.HierarchyLineEnum.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (Add('') as EXGANTTLib.Column) do
		begin
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
			Def[EXGANTTLib.DefColumnEnum.exCellPaddingRight] := TObject(4);
			AllowSizing := False;
			Width := 36;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:' + 
	'1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		CellState[TObject(hChild),TObject(0)] := 1;
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
895
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exRowLines;
	AutoDrag := EXGANTTLib.AutoDragEnum.exAutoDragPositionAny;
	HasLines := EXGANTTLib.HierarchyLineEnum.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (Add('') as EXGANTTLib.Column) do
		begin
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
			Def[EXGANTTLib.DefColumnEnum.exCellPaddingRight] := TObject(4);
			Alignment := EXGANTTLib.AlignmentEnum.RightAlignment;
			AllowSizing := False;
			Width := 24;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		CellState[TObject(hChild),TObject(0)] := 1;
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
894
Is it possible to have a different alignment for parts of the cell's caption

with AxGantt1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exRowLines;
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('Default') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
	end;
	with Items do
	begin
		CellHAlignment[TObject(AddItem('all-left')),TObject(0)] := EXGANTTLib.AlignmentEnum.LeftAlignment;
		CellHAlignment[TObject(AddItem('all-center')),TObject(0)] := EXGANTTLib.AlignmentEnum.CenterAlignment;
		CellHAlignment[TObject(AddItem('all-right')),TObject(0)] := EXGANTTLib.AlignmentEnum.RightAlignment;
		h := AddItem('left<c>center<r>right');
		CellCaptionFormat[TObject(h),TObject(0)] := EXGANTTLib.CaptionFormatEnum.exHTML;
	end;
	EndUpdate();
end
893
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		with (Add('MultipleLine') as EXGANTTLib.Column) do
		begin
			Width := 32;
			Def[EXGANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
			Def[EXGANTTLib.DefColumnEnum.exColumnResizeContiguously] := TObject(True);
		end;
		with (Add('SingleLine') as EXGANTTLib.Column) do
		begin
			Def[EXGANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
		end;
	end;
	with Items do
	begin
		CellCaption[TObject(AddItem('This is a bit of long text that should break the line')),TObject(1)] := 'This is a bit of long text that should break the line';
	end;
	EndUpdate();
end
892
How do I sort the index column as numeric

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			CellData[TObject(e.item),TObject(1)] := TObject(ItemToIndex[e.item]);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	DrawGridLines := EXGANTTLib.GridLinesEnum.exAllLines;
	ColumnAutoResize := True;
	ShowFocusRect := False;
	with (Columns.Add('Next') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(4);
		Def[EXGANTTLib.DefColumnEnum.exHeaderPaddingLeft] := TObject(4);
	end;
	with (Columns.Add('Index') as EXGANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)';
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		SortType := EXGANTTLib.SortTypeEnum.SortUserData;
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
		AddItem('Item 6');
		AddItem('Item 7');
		AddItem('Item 8');
		AddItem('Item 9');
		AddItem('Item 10');
	end;
	EndUpdate();
end
891
How can I put icons/images into buttons

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (Columns.Add('C+B') as EXGANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `';
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXGANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
		Def[EXGANTTLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True);
	end;
	Columns.Add('');
	DrawGridLines := EXGANTTLib.GridLinesEnum.exVLines;
	DefaultItemHeight := 20;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
890
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// CellButtonClick event - Fired after the user clicks on the cell of button type. 
procedure TWinForm1.AxGantt1_CellButtonClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_CellButtonClickEvent);
begin
	with AxGantt1 do
	begin
			OutputDebugString( 'CellButtonClick' );
		OutputDebugString( e.item );
	end
end;

// CellStateChanged event - Fired after cell's state has been changed.
procedure TWinForm1.AxGantt1_CellStateChanged(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_CellStateChangedEvent);
begin
	with AxGantt1 do
	begin
			OutputDebugString( 'CellStateChanged' );
		OutputDebugString( e.item );
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	with (Columns.Add('') as EXGANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		FormatColumn := '1 index ``';
	end;
	with (Columns.Add('Def') as EXGANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '`     `';
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXGANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
		Def[EXGANTTLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True);
	end;
	Columns.Add('');
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
889
Does filtering work with umlauts / accents characters
with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('Names') as EXGANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib.FilterTypeEnum.exPattern;
	end;
	with Items do
	begin
		AddItem('Mantel');
		AddItem('Mechanik');
		AddItem('Motor');
		AddItem('Murks');
		AddItem('Märchen');
		AddItem('Möhren');
		AddItem('Mühle');
		AddItem('Sérigraphie');
	end;
	Columns.Item[TObject(0)].Filter := '*ä*';
	ApplyFilter();
	EndUpdate();
end
888
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	FilterBarHeight := 0;
	FilterBarPromptVisible := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		(Add('Name') as EXGANTTLib.Column).Width := 96;
		(Add('Title') as EXGANTTLib.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Representative';
		CellCaption[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellCaption[TObject(h0),TObject(1)] := 'Vice President, Sales';
		CellCaption[TObject(h0),TObject(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Representative';
		CellCaption[TObject(h0),TObject(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Representative';
		CellCaption[TObject(h0),TObject(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Manager';
		CellCaption[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Representative';
		CellCaption[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Robert King');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Representative';
		CellCaption[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellCaption[TObject(h0),TObject(1)] := 'Inside Sales Coordinator';
		CellCaption[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellCaption[TObject(h0),TObject(1)] := 'Sales Representative';
		CellCaption[TObject(h0),TObject(2)] := 'London';
	end;
	FilterBarPromptPattern := 'London';
	EndUpdate();
end
887
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			SetParent(e.item,FindItem[CellCaption[TObject(e.item),'ReportsTo'],'EmployeeID',Nil]);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('SELECT * FROM Employees ORDER BY ReportsTo','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.ExpandItem[0] := True;
	EndUpdate();
end
886
The week number is not correct. What can I do

with AxGantt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
		UnitScale := EXGANTTLib.UnitEnum.exWeek;
		UnitWidth := 32;
		FirstVisibleDate := '1/1/2016';
		WeekNumberAs := EXGANTTLib.WeekNumberAsEnum.exISO8601WeekNumber;
		ScrollTo(FirstVisibleDate,TObject(1));
	end;
end
885
How can I display my logo on print/print-preview

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		PageOrientation := 2;
		HTMLPicture['logo'] := 'c:\exontrol\images\zipdisk.gif';
		ExtraCaption('logo','<img>logo</img>',TObject(1),TObject(1));
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
884
How can I align captions of items with checkbox, with items with no checkbox

with AxGantt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with Items do
	begin
		CellImages[TObject(AddItem(TObject(0))),TObject(0)] := '1';
		CellHasCheckBox[TObject(AddItem(TObject(1))),TObject(0)] := True;
		CellImages[TObject(AddItem(TObject(2))),TObject(0)] := '1';
	end;
	EndUpdate();
end
883
How do I show the chart's labels in 24-hour clock format

with AxGantt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%mmm%> <%d%>, <%yyyy%>';
			Alignment := Integer(EXGANTTLib.AlignmentEnum.exHOutside) Or Integer(EXGANTTLib.AlignmentEnum.CenterAlignment);
			Unit := EXGANTTLib.UnitEnum.exDay;
		end;
		with Level[1] do
		begin
			Label := '<b><%h%>:00</b>';
			Alignment := EXGANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXGANTTLib.UnitEnum.exHour;
			DrawTickLines := True;
			DrawGridLines := True;
		end;
		with Level[2] do
		begin
			Label := '<%nn%>';
			Unit := EXGANTTLib.UnitEnum.exMinute;
			Count := 15;
		end;
		ScrollTo('1/1/2001 8:30:00 AM',TObject(0));
	end;
end
882
How do I show the chart's labels in 12-hour clock format

with AxGantt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%mmm%> <%d%>, <%yyyy%>';
			Alignment := Integer(EXGANTTLib.AlignmentEnum.exHOutside) Or Integer(EXGANTTLib.AlignmentEnum.CenterAlignment);
			Unit := EXGANTTLib.UnitEnum.exDay;
		end;
		with Level[1] do
		begin
			Label := '<b><%h%>:00</b> <%AM/PM%>';
			Alignment := EXGANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXGANTTLib.UnitEnum.exHour;
			DrawTickLines := True;
			DrawGridLines := True;
		end;
		with Level[2] do
		begin
			Label := '<%nn%>';
			Unit := EXGANTTLib.UnitEnum.exMinute;
			Count := 15;
		end;
		ScrollTo('1/1/2001 8:30:00 AM',TObject(0));
	end;
end
881
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
procedure TWinForm1.AxGantt1_MouseDownEvent(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_MouseDownEvent);
begin
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
end;

with AxGantt1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	SelForeColor := ForeColor;
	with (Columns.Add('Buttons') as EXGANTTLib.Column) do
	begin
		Alignment := EXGANTTLib.AlignmentEnum.CenterAlignment;
		Def[EXGANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
	end;
	with Items do
	begin
		AddItem('Button A');
		AddItem('Button B');
		AddItem('Button C');
	end;
	EndUpdate();
end
880
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'FitToPage =1 x 2';
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
879
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'FitToPage = x 2';
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
878
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'FitToPage = 2 x';
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
877
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'FitToPage = 50%';
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
876
Does the title of the cell's tooltip supports HTML format

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('') as EXGANTTLib.Column) do
	begin
		Caption := '';
		HTMLCaption := 'Column';
	end;
	with Items do
	begin
		CellToolTip[TObject(AddItem('tooltip w/h different title')),TObject(0)] := '<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that''s shown when the user hovers the cell. This shows the titl' + 
	'e centered with a different color.';
	end;
	EndUpdate();
end
875
How do I specify a different title for the cell's tooltip

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('') as EXGANTTLib.Column) do
	begin
		Caption := 'This is the title';
		HTMLCaption := 'Column';
	end;
	with Items do
	begin
		CellToolTip[TObject(AddItem('tooltip w/h different title')),TObject(0)] := 'This is bit of text that''s shown when the user hovers the cell.';
	end;
	EndUpdate();
end
874
The cell's tooltip displays the column's caption in its title. How can I get ride of that

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('C1');
		Add('C2');
	end;
	with Items do
	begin
		h := AddItem('tooltip w/h caption');
		CellToolTip[TObject(h),TObject(0)] := 'This is bit of text that''s shown when the user hovers the cell. This shows the column''s caption in the title.';
		CellCaption[TObject(h),TObject(1)] := 'tooltip no caption';
		CellToolTip[TObject(h),TObject(1)] := 'This is bit of text that''s shown when the user hovers the cell. This shows no column''s caption in the title.';
	end;
	with Columns.Item['C2'] do
	begin
		HTMLCaption := Caption;
		Caption := '';
	end;
	EndUpdate();
end
873
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
procedure TWinForm1.AxGantt1_RClick(sender: System.Object; e: System.EventArgs);
begin
	with AxGantt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		Columns.Item[TObject(c)].ShowFilter('-1,-1,128,128');
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (Columns.Add('Items ') as EXGANTTLib.Column) do
	begin
		DisplayFilterPattern := False;
		FilterList := Integer(EXGANTTLib.FilterListEnum.exShowExclude) Or Integer(EXGANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXGANTTLib.FilterListEnum.exShowCheckBox);
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	EndUpdate();
end
872
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
procedure TWinForm1.AxGantt1_ColumnClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_ColumnClickEvent);
begin
	// Column.SortOrder = 1
	with AxGantt1 do
	begin
		SortOnClick := EXGANTTLib.SortOnClickEnum.exDefaultSort;
		Columns.Item['Sort'].SortOrder := EXGANTTLib.SortOrderEnum.SortAscending;
		SortOnClick := EXGANTTLib.SortOnClickEnum.exUserSort;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SortOnClick := EXGANTTLib.SortOnClickEnum.exUserSort;
	Columns.Add('Items');
	(Columns.Add('Sort') as EXGANTTLib.Column).Visible := False;
	with Items do
	begin
		CellCaption[TObject(AddItem('Item 1 (3)')),TObject(1)] := TObject(3);
		CellCaption[TObject(AddItem('Item 2 (1)')),TObject(1)] := TObject(1);
		CellCaption[TObject(AddItem('Item 3 (2)')),TObject(1)] := TObject(2);
	end;
	EndUpdate();
end
871
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
procedure TWinForm1.AxGantt1_ColumnClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_ColumnClickEvent);
begin
	// Column.SortOrder = 1
	with AxGantt1 do
	begin
		Items.SortChildren(0,'Sort',True);
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SortOnClick := EXGANTTLib.SortOnClickEnum.exUserSort;
	Columns.Add('Items');
	(Columns.Add('Sort') as EXGANTTLib.Column).Visible := False;
	with Items do
	begin
		CellCaption[TObject(AddItem('Item 1 (3)')),TObject(1)] := TObject(3);
		CellCaption[TObject(AddItem('Item 2 (1)')),TObject(1)] := TObject(1);
		CellCaption[TObject(AddItem('Item 3 (2)')),TObject(1)] := TObject(2);
	end;
	EndUpdate();
end
870
How can I sort by two-columns, one by date and one by time

with AxGantt1 do
begin
	BeginUpdate();
	SingleSort := False;
	with Columns do
	begin
		(Add('Index') as EXGANTTLib.Column).FormatColumn := '1 index ``';
		(Add('Date') as EXGANTTLib.Column).SortType := EXGANTTLib.SortTypeEnum.SortDate;
		with (Add('Time') as EXGANTTLib.Column) do
		begin
			SortType := EXGANTTLib.SortTypeEnum.SortTime;
			FormatColumn := 'time(value)';
		end;
	end;
	with Items do
	begin
		h := AddItem(TObject(0));
		CellCaption[TObject(h),TObject(1)] := '1/1/2001';
		CellCaption[TObject(h),TObject(2)] := '1/1/2001 10:00:00 AM';
		h := AddItem(TObject(0));
		CellCaption[TObject(h),TObject(1)] := '12/31/2000';
		CellCaption[TObject(h),TObject(2)] := '1/1/2001 10:00:00 AM';
		h := AddItem(TObject(0));
		CellCaption[TObject(h),TObject(1)] := '1/1/2001';
		CellCaption[TObject(h),TObject(2)] := '1/1/2001 6:00:00 AM';
		h := AddItem(TObject(0));
		CellCaption[TObject(h),TObject(1)] := '12/31/2000';
		CellCaption[TObject(h),TObject(2)] := '1/1/2001 8:00:00 AM';
		h := AddItem(TObject(0));
		CellCaption[TObject(h),TObject(1)] := '1/1/2001';
		CellCaption[TObject(h),TObject(2)] := '1/1/2001 8:00:00 AM';
		h := AddItem(TObject(0));
		CellCaption[TObject(h),TObject(1)] := '12/31/2000';
		CellCaption[TObject(h),TObject(2)] := '1/1/2001 6:00:00 AM';
	end;
	Layout := 'multiplesort="C1:1 C2:1"';
	EndUpdate();
end
869
How can I connect to a DBF file
with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Select * From foxcode.DBF','Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.PaneWidth[True] := 0;
	EndUpdate();
end
868
How can I change the bar's color based on values on the columns

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXGANTTLib.WeekDayEnum.exMonday;
		OverviewVisible := EXGANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	with ConditionalFormats do
	begin
		with Add('1',Nil) do
		begin
			ApplyTo := EXGANTTLib.FormatApplyToEnum($1);
			Bold := True;
			BackColor := $fafafa;
		end;
		with Add('%1 = 5',Nil) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			ForeColor := $ff;
			BarOverviewColor := $ff;
		end;
		with Add('%1 = 3',Nil) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff00;
			ForeColor := $ff00;
			BarOverviewColor := $ff00;
		end;
	end;
	EndUpdate();
end
867
Does your control supports scrolling by touching the screen

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXGANTTLib.WeekDayEnum.exMonday;
		OverviewVisible := EXGANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	ContinueColumnScroll := True;
	ScrollBySingleLine := True;
	AutoDrag := Integer(EXGANTTLib.AutoDragEnum.exAutoDragScrollOnShortTouch) Or Integer(EXGANTTLib.AutoDragEnum.exAutoDragScroll);
	EndUpdate();
end
866
How can I export the control's content to a PDF document (method 1)

with AxGantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		ShowEmptyBars := 1;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Nil,Nil);
	end;
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		CopyTo('c:/temp/xtest.pdf');
	end;
	OutputDebugString( 'Look for C:\Temp\xtest.pdf file.' );
	EndUpdate();
end
865
How can I export the control's content to a PDF document (method 2)

with AxGantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		ShowEmptyBars := 1;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Nil,Nil);
	end;
	var_CopyTo := get_CopyTo('c:/temp/xtest.pdf');
	OutputDebugString( 'Look for C:\Temp\xtest.pdf file.' );
	EndUpdate();
end
864
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

// CellStateChanged event - Fired after cell's state has been changed.
procedure TWinForm1.AxGantt1_CellStateChanged(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_CellStateChangedEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			CellCaption[TObject(e.item),TObject(2)] := TObject(CellState[TObject(e.item),TObject(0)]);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	SelBackMode := EXGANTTLib.BackModeEnum.exTransparent;
	var_ConditionalFormat := ConditionalFormats.Add('%2 != 0',Nil);
	with var_ConditionalFormat do
	begin
		Bold := True;
		ForeColor := $ff;
		ApplyTo := EXGANTTLib.FormatApplyToEnum.exFormatToItems;
	end;
	with (Columns.Add('') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Width := 16;
		AllowSizing := False;
	end;
	Columns.Add('Information');
	(Columns.Add('Hidden') as EXGANTTLib.Column).Visible := False;
	with Items do
	begin
		CellCaption[TObject(AddItem('')),TObject(1)] := 'This is a bit of text associated';
		h := AddItem('');
		CellCaption[TObject(h),TObject(1)] := 'This is a bit of text associated';
		CellState[TObject(h),TObject(0)] := 1;
		CellCaption[TObject(AddItem('')),TObject(1)] := 'This is a bit of text associated';
	end;
	EndUpdate();
end
863
How can I use no scroll bars for touch-screens

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXGANTTLib.WeekDayEnum.exMonday;
		OverviewVisible := EXGANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	AutoDrag := EXGANTTLib.AutoDragEnum.exAutoDragScroll;
	ScrollWidth := 4;
	ScrollHeight := 4;
	set_Background(EXGANTTLib.BackgroundPartEnum.exHSLeft,$c0c0c0);
	set_Background(EXGANTTLib.BackgroundPartEnum.exHSRight,$c0c0c0);
	set_Background(EXGANTTLib.BackgroundPartEnum.exHSBack,$e0e0e0);
	set_Background(EXGANTTLib.BackgroundPartEnum.exHSThumb,$808080);
	set_Background(EXGANTTLib.BackgroundPartEnum.exVSBack,$e0e0e0);
	set_Background(EXGANTTLib.BackgroundPartEnum.exVSDown,$c0c0c0);
	set_Background(EXGANTTLib.BackgroundPartEnum.exVSThumb,$808080);
	set_Background(EXGANTTLib.BackgroundPartEnum.exVSUp,$c0c0c0);
	ScrollButtonWidth := 0;
	ScrollButtonHeight := 0;
	EndUpdate();
end
862
How can I print the selected items only

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	SingleSel := False;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	with Items do
	begin
		SelectItem[ItemByIndex[0]] := True;
		SelectItem[ItemByIndex[2]] := True;
		SelectItem[ItemByIndex[4]] := True;
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'Print = Selection';
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
861
How can I sort the columns to be displayed on the columns floating bar

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		(Add('City') as EXGANTTLib.Column).Visible := False;
		(Add('Start') as EXGANTTLib.Column).Visible := False;
		(Add('End') as EXGANTTLib.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
	ColumnsFloatBarSortOrder := EXGANTTLib.SortOrderEnum.SortAscending;
end
860
How can I add a vertical padding

with AxGantt1 do
begin
	BeginUpdate();
	DrawGridLines := EXGANTTLib.GridLinesEnum.exAllLines;
	with (Columns.Add('Padding') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXGANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
		Def[EXGANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(6);
		Def[EXGANTTLib.DefColumnEnum.exCellPaddingRight] := TObject(6);
		Def[EXGANTTLib.DefColumnEnum.exCellPaddingTop] := TObject(6);
		Def[EXGANTTLib.DefColumnEnum.exCellPaddingBottom] := TObject(6);
	end;
	with Items do
	begin
		AddItem('padding');
		AddItem('padding');
	end;
	EndUpdate();
end
859
How do you embed HTML options into the anchor click string

// AnchorClick event - Occurs when an anchor element is clicked.
procedure TWinForm1.AxGantt1_AnchorClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AnchorClickEvent);
begin
	with AxGantt1 do
	begin
		OutputDebugString( e.anchorID );
		OutputDebugString( e.options );
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		(Add('Car') as EXGANTTLib.Column).Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
	end;
	with Items do
	begin
		AddItem('<a mazda_1;options for 1>Mazda <b>1</b></a>');
		AddItem('<a mazda_2;options for 2>Mazda <b>2</b></a>');
		AddItem('<a mazda_3;options for 3a>Mazda <b>3.a</b></a>');
		AddItem('<a mazda_3;options for 3b>Mazda <b>3.b</b></a>');
	end;
	EndUpdate();
end
858
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

with AxGantt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78eg' + 
	'BHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxL' + 
	'C8Mw3BDvYDkOAABAIgI=');
	(GetOcx() as EXGANTTLib.Gantt).SelBackColor := $1fffffe;
	ShowFocusRect := False;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
857
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

with AxGantt1 do
begin
	BeginUpdate();
	SelBackMode := EXGANTTLib.BackModeEnum.exTransparent;
	ShowFocusRect := False;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
856
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

with AxGantt1 do
begin
	BeginUpdate();
	SelBackColor := BackColor;
	SelForeColor := ForeColor;
	ShowFocusRect := True;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
855
Do you have any Fit-To-Page options when printing the control

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'FitToPage = On';
		PrintExt := (AxGantt1.GetOcx() as EXGANTTLib.Gantt).DefaultDispatch;
		Preview();
	end;
end
854
How can I add a footer row

with AxGantt1 do
begin
	ShowLockedItems := True;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		LockedItemCount[EXGANTTLib.VAlignmentEnum.BottomAlignment] := 1;
		h := LockedItem[EXGANTTLib.VAlignmentEnum.BottomAlignment,0];
		ItemBackColor[h] := $808080;
		ItemForeColor[h] := $ffffff;
		CellCaption[TObject(h),TObject(0)] := 'footer c1';
		CellCaption[TObject(h),TObject(1)] := 'footer c2';
		CellCaption[TObject(AddItem('cell')),TObject(1)] := 'cell';
	end;
end
853
How can I add a header row

with AxGantt1 do
begin
	ShowLockedItems := True;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		LockedItemCount[EXGANTTLib.VAlignmentEnum.TopAlignment] := 1;
		h := LockedItem[EXGANTTLib.VAlignmentEnum.TopAlignment,0];
		ItemBackColor[h] := $808080;
		ItemForeColor[h] := $ffffff;
		CellCaption[TObject(h),TObject(0)] := 'footer c1';
		CellCaption[TObject(h),TObject(1)] := 'footer c2';
		CellCaption[TObject(AddItem('cell')),TObject(1)] := 'cell';
	end;
end
852
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar

with AxGantt1 do
begin
	SortBarVisible := True;
	with Columns do
	begin
		Add(0);
		Add(1);
		Add(2);
		Add(3);
		Add(4);
	end;
	Layout := 'multiplesort="C3:1 C4:2";singlesort="C2:1"';
end
851
How can I fix a column, while other sizable and fill the control's client
with AxGantt1 do
begin
	ColumnAutoResize := True;
	Columns.Add('Sizable');
	with (Columns.Add('F') as EXGANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 16;
	end;
end
850
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

with AxGantt1 do
begin
	with Columns do
	begin
		Add('Value');
		with (Add('CellSingleLine = False') as EXGANTTLib.Column) do
		begin
			ComputedField := '%0';
			Def[EXGANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
		end;
		with (Add('FormatColumn/replace CRLF') as EXGANTTLib.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := 'value replace `\r\n` with ``';
		end;
		with (Add('FormatColumn/replace TAB,CRLF') as EXGANTTLib.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := '(value replace `\t` with ``) replace `\r\n` with ``';
		end;
	end;
	with Items do
	begin
		AddItem('a\ta\r\nb\tb');
	end;
end
849
Is there any way to "unselect" radio group

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TWinForm1.AxGantt1_DblClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_DblClickEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			h := CellChecked[1234];
			CellHasCheckBox[TObject(0),TObject(h)] := True;
			CellState[TObject(0),TObject(h)] := 0;
			CellHasCheckBox[TObject(0),TObject(h)] := False;
		end;
	end
end;

// SelectionChanged event - Fired after a new item has been selected.
procedure TWinForm1.AxGantt1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			CellState[TObject(FocusItem),TObject(0)] := 1;
		end;
	end
end;

with AxGantt1 do
begin
	MarkSearchColumn := False;
	SelBackColor := Color.FromArgb(255,255,128);
	SelForeColor := Color.FromArgb(0,0,0);
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Radio 1');
		CellHasRadioButton[TObject(h),TObject(0)] := True;
		CellRadioGroup[TObject(h),TObject(0)] := 1234;
		h := AddItem('Radio 2');
		CellHasRadioButton[TObject(h),TObject(0)] := True;
		CellRadioGroup[TObject(h),TObject(0)] := 1234;
		CellState[TObject(h),TObject(0)] := 1;
		h := AddItem('Radio 3');
		CellHasRadioButton[TObject(h),TObject(0)] := True;
		CellRadioGroup[TObject(h),TObject(0)] := 1234;
	end;
end
848
The Column.Alignment property does not seem to work for cells with images in them. What can be done

with AxGantt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	TreeColumnIndex := -1;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exAllLines;
	HeaderHeight := 24;
	DefaultItemHeight := 24;
	with (Columns.Add('Image') as EXGANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		HTMLCaption := '<img>1</img>';
		HeaderAlignment := EXGANTTLib.AlignmentEnum.CenterAlignment;
		Alignment := EXGANTTLib.AlignmentEnum.CenterAlignment;
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
	end;
	Columns.Add('Rest');
	with Items do
	begin
		AddItem('<img>1</img>');
		AddItem('<img>2</img>');
		AddItem('<img>3</img>');
	end;
	EndUpdate();
end
847
Does your control support subscript or superscript, in HTML captions

with AxGantt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Item 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','',Nil);
		ItemBar[h,'',EXGANTTLib.ItemBarPropertyEnum.exBarCaption] := '<sha ;;0>Event <b><font ;6><off -6>2<off 4>3<off 4>1';
		ItemBar[h,'',EXGANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
	end;
end
846
How do I arrange my columns on multiple levels

with AxGantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exAllLines;
	with Columns do
	begin
		with (Add('C0') as EXGANTTLib.Column) do
		begin
			ExpandColumns := '1,2';
			DisplayExpandButton := False;
		end;
		Add('C1');
		Add('C2');
		Add('C3');
		with (Add('C4') as EXGANTTLib.Column) do
		begin
			ExpandColumns := '5,6';
			DisplayExpandButton := False;
		end;
		Add('C5');
		with (Add('C6') as EXGANTTLib.Column) do
		begin
			ExpandColumns := '6,7';
			DisplayExpandButton := False;
		end;
		Add('C7');
	end;
	EndUpdate();
end
845
Does your control support expandable header or columns, so I can arrange it on multiple levels

with AxGantt1 do
begin
	BeginUpdate();
	DrawGridLines := EXGANTTLib.GridLinesEnum.exAllLines;
	BackColorLevelHeader := Color.FromArgb(240,240,240);
	with Columns do
	begin
		with (Add('Photo') as EXGANTTLib.Column) do
		begin
			AllowSizing := False;
			Width := 32;
		end;
		Add('Personal Info');
		Add('Title');
		Add('Name');
		Add('First');
		Add('Last');
		Add('Address');
		Item['Personal Info'].ExpandColumns := '2,3';
		with Item['Name'] do
		begin
			ExpandColumns := '4,5';
			Expanded := False;
		end;
	end;
	EndUpdate();
end
844
Can I change the format of date to be shown in the control

with AxGantt1 do
begin
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('Default');
		with (Add('Format.1') as EXGANTTLib.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := 'dateF(value) replace `/` with `-`';
		end;
		with (Add('Format.2') as EXGANTTLib.Column) do
		begin
			ComputedField := '%0';
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
			FormatColumn := '`<b>`+ shortdate(value) + `</b> ` + timeF(value)';
		end;
		with (Add('Format.3') as EXGANTTLib.Column) do
		begin
			ComputedField := '%0';
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
			FormatColumn := '` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) ) + `</b> ` + ( dateF(valu' + 
	'e) replace `/` with `-` )';
		end;
	end;
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('1/2/2001 10:00:00 AM');
	end;
end
843
How can I remove all bars from the chart
with AxGantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
		ClearBars(0);
	end;
end
842
How can I change the color for all bars with a specified key

with AxGantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
		ItemBar[0,'K1',EXGANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
	end;
end
841
Is there any automatic way to change a property for all bars with a specified key

with AxGantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
		ItemBar[0,'K1',EXGANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
	end;
end
840
How can I remove all bars with specified key

with AxGantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
		RemoveBar(0,'K1');
	end;
end
839
How can I find if there is any filter applied to the control

// FilterChange event - Occurs when the filter was changed.
procedure TWinForm1.AxGantt1_FilterChange(sender: System.Object; e: System.EventArgs);
begin
	with AxGantt1 do
	begin
		OutputDebugString( 'If negative, the filter is present, else not' );
		OutputDebugString( Items.VisibleItemCount );
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	TreeColumnIndex := -1;
	FilterInclude := EXGANTTLib.FilterIncludeEnum.exMatchingItemsOnly;
	with (Columns.Add('Column') as EXGANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib.FilterTypeEnum.exFilter;
		Filter := 'C1';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
838
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	TreeColumnIndex := -1;
	FilterInclude := EXGANTTLib.FilterIncludeEnum.exMatchingItemsOnly;
	with (Columns.Add('Column') as EXGANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib.FilterTypeEnum.exFilter;
		Filter := 'C1|C2';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
837
Is there any method to get only the matched items and not the items with his parent

with AxGantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	FilterInclude := EXGANTTLib.FilterIncludeEnum.exMatchingItemsOnly;
	with (Columns.Add('Column') as EXGANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib.FilterTypeEnum.exFilter;
		Filter := 'C1|C2';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
836
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

with AxGantt1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Layout := 'Select="0";SingleSort="C0:2";Columns=1';
	EndUpdate();
end
835
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

with AxGantt1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Layout := 'gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQ' + 
	'Aqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0j' + 
	'E3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI=';
	EndUpdate();
end
834
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

with AxGantt1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Columns do
	begin
		Add('Column 1');
		Add('Column 2');
	end;
	(GetOcx() as EXGANTTLib.Gantt).BackColorHeader := $1000000;
	set_Background(EXGANTTLib.BackgroundPartEnum.exCursorHoverColumn,$12d86ff);
end
833
Is it possible to change the visual appearance of the columns selector/floating bar(3)

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
	end;
	VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn');
	VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn');
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatAppearance,$2000000);
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,$3000000);
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatCaptionBackColor,$f0f5f6);
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
832
Is it possible to change the visual appearance of the columns selector/floating bar(2)

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
	end;
	VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn');
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,$3000000);
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
831
Is it possible to change the visual appearance of the columns selector/floating bar(1)

with AxGantt1 do
begin
	VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn');
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatAppearance,$2000000);
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,$f0f5f6);
	set_Background(EXGANTTLib.BackgroundPartEnum.exColumnsFloatCaptionBackColor,$f0f5f6);
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
830
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
829
Is it possible to list a column to columns selector/floating bar, but still user can use it

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
		with (Add('Column 3') as EXGANTTLib.Column) do
		begin
			Visible := False;
			Enabled := False;
		end;
	end;
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
828
How can I prevent a specific column not to be listed in the columns selector/floating bar

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
		with (Add('Column 3') as EXGANTTLib.Column) do
		begin
			Visible := False;
			AllowDragging := False;
		end;
	end;
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
827
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
	end;
	set_Description(EXGANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Hidden Columns');
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
826
How can I show the columns selector, so the user can drag and drop columns to the view

with AxGantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXGANTTLib.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := EXGANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
825
The column's header is changed while the cursor hovers it. Is it possible to prevent that

with AxGantt1 do
begin
	with Columns do
	begin
		Add('Column 1');
		Add('Column 2');
	end;
	set_Background(EXGANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff);
end
824
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

with AxGantt1 do
begin
	BeginUpdate();
	ScrollBars := EXGANTTLib.ScrollBarsEnum.exDisableBoth;
	Chart.ToolTip := '';
	set_ScrollPartVisible(EXGANTTLib.ScrollBarEnum.exVScroll,EXGANTTLib.ScrollPartEnum.exExtentThumbPart,True);
	set_ScrollPartVisible(EXGANTTLib.ScrollBarEnum.exHScroll,EXGANTTLib.ScrollPartEnum.exExtentThumbPart,True);
	set_ScrollPartVisible(EXGANTTLib.ScrollBarEnum.exHChartScroll,EXGANTTLib.ScrollPartEnum.exExtentThumbPart,True);
	ScrollWidth := 4;
	set_Background(EXGANTTLib.BackgroundPartEnum.exVSBack,$f0f0f0);
	set_Background(EXGANTTLib.BackgroundPartEnum.exVSThumb,$808080);
	ScrollHeight := 4;
	set_Background(EXGANTTLib.BackgroundPartEnum.exHSBack,get_Background(EXGANTTLib.BackgroundPartEnum.exVSBack));
	set_Background(EXGANTTLib.BackgroundPartEnum.exHSThumb,get_Background(EXGANTTLib.BackgroundPartEnum.exVSThumb));
	set_Background(EXGANTTLib.BackgroundPartEnum.exScrollSizeGrip,get_Background(EXGANTTLib.BackgroundPartEnum.exVSBack));
	EndUpdate();
end
823
How can I display the Year in Thai, Buddhist, Korean format

with AxGantt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		with Level[0] do
		begin
			Label := '<%mmmm%> <%d%>, <%loc_yyyy%> <r><%ww%>';
			Unit := EXGANTTLib.UnitEnum.exWeek;
			ToolTip := Label;
		end;
		ToolTip := '<%ddd%> <%m%>/<%d%>/<%loc_yyyy%>';
	end;
	set_Description(EXGANTTLib.DescriptionTypeEnum.exFilterBarDateMonths,Chart.MonthNames);
end
822
How does localization work

with AxGantt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
	end;
end
821
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (Add('Car') as EXGANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := EXGANTTLib.FilterTypeEnum.exFilter;
			Filter := 'MAZDA';
		end;
		with (Add('Equipment') as EXGANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			DisplayFilterPattern := False;
			CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
			FilterType := EXGANTTLib.FilterTypeEnum.exPattern;
			Filter := 'AIR BAG';
		end;
	end;
	with Items do
	begin
		CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag';
		CellCaption[TObject(AddItem('Toyota')),TObject(1)] := 'Air Bag,Air condition';
		CellCaption[TObject(AddItem('Ford')),TObject(1)] := 'Air condition';
		CellCaption[TObject(AddItem('Nissan')),TObject(1)] := 'Air Bag,ABS,ESP';
		CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag, ABS,ESP';
		CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'ABS,ESP';
	end;
	ApplyFilter();
	EndUpdate();
end
820
How can I have a case-sensitive filter

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (Add('Car') as EXGANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := Integer(EXGANTTLib.FilterTypeEnum.exFilterDoCaseSensitive) Or Integer(EXGANTTLib.FilterTypeEnum.exFilter);
			Filter := 'Mazda';
		end;
		with (Add('Equipment') as EXGANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			DisplayFilterPattern := False;
			CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
			FilterType := Integer(EXGANTTLib.FilterTypeEnum.exFilterDoCaseSensitive) Or Integer(EXGANTTLib.FilterTypeEnum.exPattern);
			Filter := 'Air Bag';
		end;
	end;
	with Items do
	begin
		CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag';
		CellCaption[TObject(AddItem('Toyota')),TObject(1)] := 'Air Bag,Air condition';
		CellCaption[TObject(AddItem('Ford')),TObject(1)] := 'Air condition';
		CellCaption[TObject(AddItem('Nissan')),TObject(1)] := 'Air Bag,ABS,ESP';
		CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag, ABS,ESP';
		CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'ABS,ESP';
	end;
	ApplyFilter();
	EndUpdate();
end
819
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

// SelectionChanged event - Fired after a new item has been selected.
procedure TWinForm1.AxGantt1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			ClearItemBackColor(0);
			ItemBackColor[SelectedItem[0]] := $ffff80;
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SelForeColor := ForeColor;
	SelBackColor := BackColor;
	ShowFocusRect := False;
	with Columns do
	begin
		with (Add('Format') as EXGANTTLib.Column) do
		begin
			FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + 
	'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		end;
	end;
	with Items do
	begin
		AddItem(TObject(10));
		AddItem(TObject(-8));
	end;
	EndUpdate();
end
818
How do I hide the selection
with AxGantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SelForeColor := ForeColor;
	SelBackColor := BackColor;
	ShowFocusRect := False;
	with Columns do
	begin
		with (Add('Format') as EXGANTTLib.Column) do
		begin
			FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + 
	'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
			Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		end;
	end;
	with Items do
	begin
		AddItem(TObject(10));
		AddItem(TObject(-8));
	end;
	EndUpdate();
end
817
How do I access the cells, or how do I get the values in the columns
with AxGantt1 do
begin
	with Columns do
	begin
		Add('C1');
		Add('C2');
		Add('C3');
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		CellCaption[TObject(h),TObject(1)] := 'SubItem 1.1';
		CellCaption[TObject(h),TObject(2)] := 'SubItem 1.2';
		OutputDebugString( CellCaption[TObject(h),TObject(2)] );
	end;
end
816
How can I change the check-boxes appearance

with AxGantt1 do
begin
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('Default') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	with VisualAppearance do
	begin
		Add(1,'XP:Button 3 12');
		Add(2,'XP:Button 3 11');
		Add(3,'XP:Button 3 10');
	end;
	set_CheckImage(EXGANTTLib.CheckStateEnum.Unchecked,16777216);
	set_CheckImage(EXGANTTLib.CheckStateEnum.Checked,33554432);
	set_CheckImage(EXGANTTLib.CheckStateEnum.PartialChecked,50331648);
end
815
How can I load my table from an Access 2007, using ADO

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXGANTTLib.WeekDayEnum.exMonday;
		OverviewVisible := EXGANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	EndUpdate();
end
814
Is it possible display numbers in the same format no matter of regional settings in the control panel

with AxGantt1 do
begin
	BeginUpdate();
	(Columns.Add('Def') as EXGANTTLib.Column).Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
	with Items do
	begin
		h := AddItem(TObject(666666.27));
		FormatCell[TObject(h),TObject(0)] := '(value format '''') +  '' <fgcolor=808080>(default positive)''';
		h := AddItem(TObject(666666.27));
		FormatCell[TObject(h),TObject(0)] := '(value format ''2|.|3|,|1|1'')';
		h := AddItem(TObject(-666666.27));
		FormatCell[TObject(h),TObject(0)] := '(value format '''') +  '' <fgcolor=808080>(default negative)''';
		h := AddItem(TObject(-666666.27));
		FormatCell[TObject(h),TObject(0)] := '(value format ''2|.|3|,|1|1'')';
	end;
	EndUpdate();
end
813
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that

with AxGantt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		ScrollRange[EXGANTTLib.ScrollRangeEnum.exStartDate] := '1/1/2001';
		ScrollRange[EXGANTTLib.ScrollRangeEnum.exEndDate] := '1/1/2001';
		UnitScale := EXGANTTLib.UnitEnum.exHour;
		NonworkingHours := 12582975;
		ShowNonworkingUnits := False;
		Level[0].Alignment := Integer(EXGANTTLib.AlignmentEnum.exHOutside) Or Integer(EXGANTTLib.AlignmentEnum.CenterAlignment);
		UnitWidth := 18;
		PaneWidth[True] := 294;
		ScrollBar := False;
	end;
	OnResizeControl := EXGANTTLib.OnResizeControlEnum.exDisableSplitter;
	EndUpdate();
end
812
Can I use ebn files to display the selected dates

with AxGantt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'c:\exontrol\images\normal.ebn');
		Add(1,'CP:2 0 -4 0 4');
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
		SelectDate['1/4/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Nil,Nil);
		AddBar(AddItem('Item 4'),'Task','1/5/2008','1/9/2008',Nil,Nil);
	end;
	EndUpdate();
end
811
Can I use ebn files to display the selected dates

with AxGantt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Nil,Nil);
	end;
	EndUpdate();
end
810
How can I change the color for selected dates to be solid

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $7fff0000;
		SelectLevel := 1;
		SelectDate['1/15/2008'] := True;
		SelectDate['1/16/2008'] := True;
	end;
	EndUpdate();
end
809
How can I add or change the padding (spaces) for captions in the control's header

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	(Columns.Add('Padding-Left') as EXGANTTLib.Column).Def[EXGANTTLib.DefColumnEnum.exHeaderPaddingLeft] := TObject(18);
	with (Columns.Add('Padding-Right') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exHeaderPaddingRight] := TObject(18);
		HeaderAlignment := EXGANTTLib.AlignmentEnum.RightAlignment;
	end;
	EndUpdate();
end
808
Do you have any plans to add cell spacing and cell padding to the cells

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	DrawGridLines := EXGANTTLib.GridLinesEnum.exAllLines;
	with (Columns.Add('Padding-Left') as EXGANTTLib.Column) do
	begin
		Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXGANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(18);
	end;
	(Columns.Add('No-Padding') as EXGANTTLib.Column).Def[EXGANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
	(Columns.Add('Empty') as EXGANTTLib.Column).Position := 0;
	with Items do
	begin
		CellCaption[TObject(AddItem('Item A.1')),TObject(1)] := 'Item A.2';
		CellCaption[TObject(AddItem('Item B.1')),TObject(1)] := 'Item B.2';
		CellCaption[TObject(AddItem('Item C.1')),TObject(1)] := 'Item C.2';
	end;
	EndUpdate();
end
807
Is it possible to display information about the firing events
// Event event - Notifies the application once the control fires an event.
procedure TWinForm1.AxGantt1_Event(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_EventEvent);
begin
	with AxGantt1 do
	begin
		OutputDebugString( get_EventParam(-2) );
	end
end;


806
Is it possible to scroll the control's content by clicking and moving the mouse up or down

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXGANTTLib.WeekDayEnum.exMonday;
		OverviewVisible := EXGANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	AutoDrag := EXGANTTLib.AutoDragEnum.exAutoDragScroll;
	EndUpdate();
end
805
How do I load bars from my ADO table/database

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxGantt1_AddItem(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_AddItemEvent);
begin
	with AxGantt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellCaption[TObject(e.item),TObject(2)],CellCaption[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxGantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXGANTTLib.WeekDayEnum.exMonday;
		OverviewVisible := EXGANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	EndUpdate();
end
804
Is it possible to auto-numbering the children items but still keeps the position after filtering

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('Items') as EXGANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib.FilterTypeEnum.exFilter;
		Filter := 'Child 2';
	end;
	with (Columns.Add('Pos.1') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 ropos ''''';
		Position := 0;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.2') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 ropos '':''';
		Position := 1;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.3') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 ropos '':|A-Z''';
		Position := 2;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.4') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 ropos ''|A-Z|''';
		Position := 3;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.5') as EXGANTTLib.Column) do
	begin
		FormatColumn := '''<font Tahoma;7>'' + 1 ropos ''-<b>||A-Z''';
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		Position := 4;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.6') as EXGANTTLib.Column) do
	begin
		FormatColumn := '''<b>''+ 1 ropos ''</b>:<fgcolor=FF0000>|A-Z|''';
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		Position := 5;
		Width := 48;
		AllowSizing := False;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
	end;
	ApplyFilter();
	EndUpdate();
end
803
Is it possible to auto-numbering the children items too

with AxGantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXGANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Columns.Add('Items');
	with (Columns.Add('Pos.1') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 rpos ''''';
		Position := 0;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.2') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 rpos '':''';
		Position := 1;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.3') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 rpos '':|A-Z''';
		Position := 2;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.4') as EXGANTTLib.Column) do
	begin
		FormatColumn := '1 rpos ''|A-Z|''';
		Position := 3;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.5') as EXGANTTLib.Column) do
	begin
		FormatColumn := '''<font Tahoma;7>'' + 1 rpos ''-<b>||A-Z''';
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		Position := 4;
		Width := 32;
		AllowSizing := False;
	end;
	with (Columns.Add('Pos.6') as EXGANTTLib.Column) do
	begin
		FormatColumn := '''<b>''+ 1 rpos ''</b>:<fgcolor=FF0000>|A-Z|''';
		Def[EXGANTTLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
		Position := 5;
		Width := 48;
		AllowSizing := False;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
	end;
	EndUpdate();
end
802
Is there any way to add auto-numbering

with AxGantt1 do
begin
	with Columns do
	begin
		Add('Items');
		with (Add('Pos') as EXGANTTLib.Column) do
		begin
			FormatColumn := '1 pos ''''';
			Position := 0;
		end;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
end
801
How can I format my column to display the percent values “5,00%”

with AxGantt1 do
begin
	(Columns.Add('Percent') as EXGANTTLib.Column).FormatColumn := '((dbl(value) * 100) format ''2|,|3.'')+''%''';
	with Items do
	begin
		AddItem(TObject(0.5));
		AddItem(TObject(0.4));
		AddItem(TObject(0.75));
	end;
end